// 通知帮助类
import {Message } from 'element-ui'
import { Notification } from 'element-ui';

export function successM(title) {
  Message({
    type: 'success',
    message: title ? title : '操作成功',
    duration: 1500
  })
}

export function errorM(title) {
  Message({
    type: 'error',
    message: title ? title : '操作失败',
    duration: 1500
  })
}

export function warnM(title) {
  Message({
    type: 'warning',
    message: title ? title : '操作失败',
    duration: 1500
  })
}

export function successN(title) {
  Notification({
    title: '温馨提示',
    message: title ? title : '操作成功',
    type: 'success',
    duration: 1500
  })
}

export function errorN(title) {
  Notification({
    title: '错误',
    message: title ? title : '操作失败',
    type: 'error',
    duration: 1500
  })
}

export function warnN(title) {
  Notification({
    title: '警告',
    message: title ? title : '操作失败',
    type: 'warning',
    duration: 1500
  })
}
